package com.ruoyi.wbgame.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wbgame.mapper.WbStuAnswerMapper;
import com.ruoyi.wbgame.domain.WbStuAnswer;
import com.ruoyi.wbgame.service.IWbStuAnswerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 学生回答的选项Service业务层处理
 * 
 * @author guguofu
 * @date 2021-04-16
 */
@Service
public class WbStuAnswerServiceImpl implements IWbStuAnswerService 
{
    @Autowired
    private WbStuAnswerMapper wbStuAnswerMapper;

    /**
     * 查询学生回答的选项
     * 
     * @param studentId 学生回答的选项ID
     * @return 学生回答的选项
     */
    @Override
    public WbStuAnswer selectWbStuAnswerById(Long studentId)
    {
        return wbStuAnswerMapper.selectWbStuAnswerById(studentId);
    }

    /**
     * 查询学生回答的选项列表
     * 
     * @param wbStuAnswer 学生回答的选项
     * @return 学生回答的选项
     */
    @Override
    public List<WbStuAnswer> selectWbStuAnswerList(WbStuAnswer wbStuAnswer)
    {
        return wbStuAnswerMapper.selectWbStuAnswerList(wbStuAnswer);
    }

    /**
     * 新增学生回答的选项
     * 
     * @param wbStuAnswer 学生回答的选项
     * @return 结果
     */
    @Override
    public int insertWbStuAnswer(WbStuAnswer wbStuAnswer)
    {
        return wbStuAnswerMapper.insertWbStuAnswer(wbStuAnswer);
    }

    /**
     * 修改学生回答的选项
     * 
     * @param wbStuAnswer 学生回答的选项
     * @return 结果
     */
    @Override
    public int updateWbStuAnswer(WbStuAnswer wbStuAnswer)
    {
        return wbStuAnswerMapper.updateWbStuAnswer(wbStuAnswer);
    }

    /**
     * 删除学生回答的选项对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWbStuAnswerByIds(String ids)
    {
        return wbStuAnswerMapper.deleteWbStuAnswerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除学生回答的选项信息
     * 
     * @param studentId 学生回答的选项ID
     * @return 结果
     */
    @Override
    public int deleteWbStuAnswerById(Long studentId)
    {
        return wbStuAnswerMapper.deleteWbStuAnswerById(studentId);
    }
}
